package com.px.chapter_Dec_1.thread;
public class Bank {
    public static void main(String[] args) throws InterruptedException {
        InBank inBank=new InBank();
        Thread thread=new Thread(inBank);
        Thread thread1=new Thread(inBank);
        thread.start();
        thread1.start();
        Thread.sleep(500);
        System.out.println(Card.money);
    }
}
class InBank implements Runnable{
    @Override
    public void run() {
        for (int a=0;a<3;a++){
            Card.money=Card.money+1000;
        }
    }
}
  class   Card {
      public static int money = 0;
  }